<!--
 * @Author: shy_didi
 * @Date: 2020-06-10 09:55:57
 * @LastEditTime: 2020-06-10 11:03:41
 * @LastEditors: Please set LastEditors
 * @Description: 返回顶部
 * @FilePath: \发明人\fmr\src\pages\home\components\scrollTop.vue
--> 
<template>
  <div class="scrollTop">
    <van-button type="info" @click="top">
      <van-icon name="arrow-up" />
    </van-button>
  </div>
</template>

<script>
import $ from "jquery";
export default {
  methods: {
    top() {
      $("html,body").animate(
        {
          scrollTop: 0
        },
        500
      );
    }
  }
};
</script>

<style lang="scss" scoped>
@import "@/style/home.scss";
</style>